package layers.ants;

import layers.agents.TruckAgent;

public class ExplorationAntStateFoundPackage extends ExplorationAntState {

	/**
	 * If package is found, notify truck of it's existence and die
	 * @param ant
	 */
	public ExplorationAntStateFoundPackage(ExplorationAnt ant) {
		super(ant);
		this.notifyTruck();
		this.getAnt().die();
	}

	@Override
	protected void processTick() {
		
	}
	
	public String toString(){
		return ""+this.getAnt().getId();
	}
	
	protected void notifyTruck(){
		 ((TruckAgent)(this.getAnt().getAgent())).addPath(this.getAnt().getPath());
	}
}
